package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.Goods;
import com.xca.znb.entity.Local;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.IClearing;

public class ClearingImpl implements IClearing {
    private UserDAO userDAO ;
    public ClearingImpl(Context context){
        userDAO = new UserDAO(context);
    }

    @Override
    public int getDefaultLocalId(String phone) {
        return userDAO.getLocalDefaultId(phone);
    }

    @Override
    public Local getLocalById(int id) {
        return userDAO.getLocalById(id);
    }

    @Override
    public User getUserByPhone(String phone) {
        return userDAO.getUser(phone);
    }

    @Override
    public Goods getGoodsById(int id) {
        return userDAO.getGoodsById(id);
    }
}
